<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <!-- import CSS -->
  <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.9/theme-chalk/index.css">
</head>
<body>
<div id="app">
  {{value}}
  <template>
    <el-select @change="handleSelect" v-model="value" placeholder="请选择">
      <!-- label 给用户看到的内容 -->
      <!-- value 选中后得到的内容 -->
      <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value">
      </el-option>
    </el-select>
  </template>
  <hr>
  <el-select @change="handleSelectProduct" v-model="price" placeholder="请选择商品">
    <el-option
            v-for="p in arr"
            :label="p.title"
            :value="p.price">
    </el-option>
  </el-select>
</div>
</body>

<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
<script>
  let v = new Vue({
    el: '#app',
    data: function () {
      return {
        options: [{
          value: '选项1',
          label: '黄金糕'
        }, {
          value: '选项2',
          label: '双皮奶'
        }, {
          value: '选项3',
          label: '蚵仔煎'
        }, {
          value: '选项4',
          label: '龙须面'
        }, {
          value: '选项5',
          label: '北京烤鸭'
        }],
        value: '',
        arr:[
          {title:"小米手机",price:5000},
          {title:"vivo手机",price:11000},
          {title:"华为手机",price:321000},
          {title:"oppo手机",price:1231000}
        ],
        price:''
      }
    },
    methods:{
      handleSelect(){
        /* 把用户选择的值弹出 */
        v.$message(v.value)
      },
      handleSelectProduct(){
        v.$message("您选择的商品价格是："+v.price+"元")
      }
    }
  })
</script>
</html>